package com.cj.cms.dao.security;

import java.util.Date;

import org.springframework.stereotype.Repository;

import com.cj.cms.entity.Article;
import com.cj.common.orm.hibernate.HibernateDao;

@Repository
public class ArticleDao extends HibernateDao<Article, Long> {
	@Override
	public void save(Article entity) {
		if(entity.getId() == null){
			entity.setCreateTime(new Date());
		}
		entity.setModifyTime(new Date());
		super.save(entity);
	}
	
}
